import React, { useState, useEffect, useContext } from "react";
// 组件一, useContext 写法
function Item3() {
  const count = useContext(Context);
  return <div>{count}</div>;
}

const Login: React.FC = () => {
  const [count, setCount] = useState(0);
  return (
    <div>
      点击次数: {count}
      <button
        onClick={() => {
          setCount(count + 1);
        }}
      >
        点我
      </button>
      <Item3></Item3>
    </div>
  );
};

export default Login;
